<?php

$username = array(
	'name'	=> 'username',
	'id'	=> 'username',
	'size'	=> 30,
	'value' => set_value('username')
);

$password = array(
	'name'	=> 'password',
	'id'	=> 'password',
	'size'	=> 30
);

$remember = array(
	'name'	=> 'remember',
	'id'	=> 'remember',
	'value'	=> 1,
	'checked'	=> set_value('remember'),
	'style' => 'margin:0;padding:0'
);

$confirmation_code = array(
	'name'	=> 'captcha',
	'id'	=> 'captcha',
	'maxlength'	=> 8
);


?>

	<?php if($this->dx_auth->get_auth_error()): ?>
	
	<div class="error">
		<div><?php echo $this->dx_auth->get_auth_error(); ?></div>
	</div>
	<?php endif;?>
	
	<?php $this->form_validation->set_error_delimiters('<div>', '</div>'); ?>
	<?php if(validation_errors()): ?>	
	<div class="error">
		<div><?php echo validation_errors(); ?></div>
	</div>
	<?php endif;?>
	
	<div id="form-container">
		<?php echo form_open($this->uri->uri_string())?>
		<fieldset>
			<legend>Login</legend>
			<ol>
				<li>
					<label class="field-title">Username:</label>
					<label class="txt-field"><?php echo form_input($username)?></label>
				</li>
				<li>
					<label class="field-title">Password:</label>
					<label class="txt-field"><?php echo form_password($password)?></label>
				</li>
				
				<?php if ($show_captcha): ?>
				<li>
					<div class="captcha">
						<label class="field-title">Captcha:</label>
						<label class="txt-field"><?php echo form_input($confirmation_code);?></label>
					</div>
					<div class="align-right"><?php echo $this->dx_auth->get_captcha_image(); ?></div>
				</li>
				<?php endif; ?>
				
				<li>
					<label class="remember"><?php echo form_checkbox($remember);?> Recordarme</label>
					<div class="align-right">
						<input type="image" src="<?php echo static_url("images/bt-login.gif")?>" name="submit"/>
					</div>
				</li>
				
				
			</ol>
		</fieldset>
		<span class="clearFix"> </span>
		<?php echo form_close()?>
	</div>